package com.bing.services.impl;

import com.bing.bean.weixin.Account;
import com.bing.bean.weixin.Article;
import com.bing.dao.ArticleDao;
import com.bing.services.NewService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 * Created by Administrator on 2015/6/16.
 */

@Service
@Transactional
public class NewServiceImpl implements NewService {


    @Autowired
    private ArticleDao articleDao;


    @Override
    public Article createNew(Article article, Account account) {
        articleDao.createArticle(article);
        if(account!=null){

        }
        return null;
    }

    @Override
    public Article findById(int id) {
        return articleDao.findById(id);
    }

    @Override
    public void updateNew(Article article) {
        articleDao.updateArticle(article);
    }
}
